type MyQueue struct {
	stackPush, stackPop []int
}

func Constructor() MyQueue {

	return MyQueue{
		stackPush: make([]int, 0),
		stackPop:  make([]int, 0),
	}
}

func (this *MyQueue) Push(x int) {

	this.stackPush = append(this.stackPush, x)
	this.pushToPop()
}

func (this *MyQueue) Pop() int {
	this.pushToPop()
	value := this.stackPop[len(this.stackPop)-1]
	this.stackPop = this.stackPop[:len(this.stackPop)-1]
	return value
}

func (this *MyQueue) Peek() int {
	this.pushToPop()
	return this.stackPop[len(this.stackPop)-1]
}

func (this *MyQueue) Empty() bool {

	this.pushToPop()
	if len(this.stackPop) == 0 {
		return true
	}

	return false
}

func (this *MyQueue) pushToPop() {
	if this.isEmptyPop() {
		for !this.isEmptyPush() {
			value := this.stackPush[len(this.stackPush)-1]
			this.stackPush = this.stackPush[:len(this.stackPush)-1]
			this.stackPop = append(this.stackPop, value)
		}
	}
}

func (this *MyQueue) isEmptyPop() bool {
	if len(this.stackPop) == 0 {
		return true
	}

	return false
}

func (this *MyQueue) isEmptyPush() bool {

	if len(this.stackPush) == 0 {
		return true
	}

	return false
}